x86: Restrict MSR access when the kernel is locked down
authorMatthew Garrett <matthew.garrett@nebula.com>
Wed, 5 Apr 2017 16:40:30 +0000 (17:40 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 17 Jul 2017 02:01:21 +0000 (03:01 +0100)
commit2fed75d67d6570c5c60add892062dd6ef9e2b5bc
tree49f99cb59c5f4e1a6f89517f6291a6a932f2fd48
parentcddc60f57e691aae84467419f86c3d9e273c2456
x86: Restrict MSR access when the kernel is locked down

Writing to MSRs should not be allowed if the kernel is locked down, since
it could lead to execution of arbitrary code in kernel mode.  Based on a
patch by Kees Cook.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0052-x86-Restrict-MSR-access-when-the-kernel-is-locked-do.patch
arch/x86/kernel/msr.c